local storm = require 'jass.storm'
local message = require 'jass.message'

local extensions = {
    ['.blp'] = true,
    -- ['.tga'] = true,
    ['.mdx'] = true,
    ['.mdl'] = true,
}

if package.local_test then 
    message.file_hook = function(file)
        local name = file:lower():sub(-4)
        if extensions[name] then 
            local parent = message.origin_load(package.local_map_path .. 'resource\\' .. file)
            if not parent then 
                -- return message.origin_load("D:\\MyResource\\十殿阎罗\\" .. file)
                return message.origin_load(file) 
            end 
            return parent
        end 
        return message.origin_load(file) 
    end
end 
